package com.itheima.reggie.config;

import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

/**
 * @Description: hamo
 * @Create by: 渭北彭于晏
 * @Date: 2021/10/31 15:40
 */
@Configuration
public class MyBatisConfig {

    @Bean
    public MybatisPlusInterceptor pageConfig(){
        MybatisPlusInterceptor pageConfig = new MybatisPlusInterceptor();
        pageConfig.addInnerInterceptor(new PaginationInnerInterceptor());
        return pageConfig;
    }
}
